<?php
set_time_limit(0);

session_start();
ob_start();

	$dir = date("d-m-y--H-i-s");
	
 
 
 //GENERO EL PDF
 require('testpdf/fpdf.php');
class PDF extends FPDF
{

// Cabecera de página
	function Header()
	{
	 $this->Line(10,10,590,10);
        $this->Line(10,20,590,20);
    // Logo
		$this->Image('img/favicon.jpg',10,8,50);
    // Arial bold 15
	$this->SetFont('Arial','B',15);

    // Movernos a la derecha
    // Título
		$this->Cell(0,10,' 		REPORTE',0,1,'C');
			$this->SetFont('Arial','I',9);
		$this->Cell(0,10,utf8_decode("Generado el día: ").date('d/m/Y'),0,1,'C');
			
    // Salto de línea
		$this->Ln(20);
	}
// Pie de página
	function Footer()
	{
    // Posición: a 1,5 cm del final
		$this->SetY(-15);
    // Arial italic 8
	$this->SetFont('Arial','I',8);
    // Número de página
		$this->Cell(0,10,'pagina '.$this->PageNo().'/{nb}',0,0,'C');
	}
}
$generado=$dir+"Reporte-Automatico-fecha";
date_default_timezone_set("America/Guatemala");
    $pdf = new PDF('P','pt',array(612,1008));
    $pdf->AliasNbPages();
	/*
	//1A
    $pdf->AddPage();     
	$pdf->SetFont('Arial','I',8);
    $pdf->Image("ImagenesJornada1/imgL1_1A_J1.png",60,70,480,900);
	

	 //1B
	 $pdf->AddPage();     
	 $pdf->SetFont('Arial','I',8);	
     $pdf->Image("ImagenesJornada1/imgL1_1b_J1.png",60,70,480,900);
	 
	 //2A
	 $pdf->AddPage();     
	 $pdf->SetFont('Arial','I',8);	
     $pdf->Image("ImagenesJornada1/imgL1_2A_J1.png",60,70,480,900);
	
	//2B
	$pdf->AddPage();     
	$pdf->SetFont('Arial','I',8);
    $pdf->Image("ImagenesJornada1/imgL1_2B_J1.png",60,70,480,900);
	 
	//3A
	 $pdf->AddPage();     
	 $pdf->SetFont('Arial','I',8);
     $pdf->Image("ImagenesJornada1/imgL1_3A_J1.png",60,70,480,900);
	 
	 //3B
	 $pdf->AddPage();     
	 $pdf->SetFont('Arial','I',8);
     $pdf->Image("ImagenesJornada1/imgL1_3B_J1.png",60,70,480,900);
	  
	  //4A
	 $pdf->AddPage();     
	 $pdf->SetFont('Arial','I',8);	
     $pdf->Image("ImagenesJornada1/imgL1_4A_J1.png",60,70,480,900);
	
	//4B
	$pdf->AddPage();     
	$pdf->SetFont('Arial','I',8);	
     $pdf->Image("ImagenesJornada1/imgL1_4B_J1.png",60,70,480,900);

	 //5A
	 $pdf->AddPage();     
	 $pdf->SetFont('Arial','I',8);
	 $pdf->Image("ImagenesJornada1/imgL1_5A_J1.png",60,70,480,900);
	 
	 //5B
	 $pdf->AddPage();     
	 $pdf->SetFont('Arial','I',8);
     $pdf->Image("ImagenesJornada1/imgL1_5B_J1.png",60,70,480,900);
	 
	 */
	 //JORNADA 2
	 
	 //1A
    $pdf->AddPage();     
	$pdf->SetFont('Arial','I',8);
    $pdf->Image("ImagenesJornada2/imgL1_1A_J2.png",60,70,480,900);
	 
	 //1B
	 $pdf->AddPage();     
	 $pdf->SetFont('Arial','I',8);	
     $pdf->Image("ImagenesJornada2/imgL1_1B_J2.png",60,70,480,900);
	 
	 //2A
	 $pdf->AddPage();     
	 $pdf->SetFont('Arial','I',8);	
     $pdf->Image("ImagenesJornada2/imgL1_2A_J2.png",60,70,480,900);
	
	//2B
	$pdf->AddPage();     
	$pdf->SetFont('Arial','I',8);
    $pdf->Image("ImagenesJornada2/imgL1_2B_J2.png",60,70,480,900);
	 
	//3A
	 $pdf->AddPage();     
	 $pdf->SetFont('Arial','I',8);
     $pdf->Image("ImagenesJornada2/imgL1_3A_J2.png",60,70,480,900);
	 
	 //3B
	 $pdf->AddPage();     
	 $pdf->SetFont('Arial','I',8);
     $pdf->Image("ImagenesJornada2/imgL1_3B_J2.png",60,70,480,900);
	  
	  //4A
	 $pdf->AddPage();     
	 $pdf->SetFont('Arial','I',8);	
     $pdf->Image("ImagenesJornada2/imgL1_4A_J2.png",60,70,480,900);
	
	//4B
	$pdf->AddPage();     
	$pdf->SetFont('Arial','I',8);	
     $pdf->Image("ImagenesJornada2/imgL1_4B_J2.png",60,70,480,900);

	 //5A
	 $pdf->AddPage();     
	 $pdf->SetFont('Arial','I',8);
	 $pdf->Image("ImagenesJornada2/imgL1_5A_J2.png",60,70,480,900);
	 
	 //5B
	 $pdf->AddPage();     
	 $pdf->SetFont('Arial','I',8);
     $pdf->Image("ImagenesJornada2/imgL1_5B_J2.png",60,70,480,900);

   $pdf->Output("reportes_JornadaTotal\/reporte-".$dir."-Jornada2.pdf");
	




	
?>